import request from '@/http'
import config from '@/http/config'

const api = `${config.search.ip}/api/search`
const apiAssist =`${config.assist.ip}/api/assist`
/*
* 获取热搜词
* method：get
* */
export const getHotSearchWords = () => request({
  url:`${api}/quick/getHotSearchWords`,
  method:'get'
})

/*
* 构建检索式接口
* method：post
* */
export const buildSearch = (data) => request({
  url:`${api}/quick/buildSearch`,
  method:'post',
  data
})

/*
* 获取热门推荐列表
* method：post
* */
export const showhotRecommendList = (data) => request({
  url:`${apiAssist}/hotRecommend/showhotRecommendList`,
  method:'post',
  data
})
/*
* 获取热门检索列表
* method：post
* */
export const showPopularSearchList = (data) => request({
  url:`${apiAssist}/hotRecommend/showPopularSearchList`,
  method:'post',
  data
})
/*
* 获取模板列表
* method：post
* */
export const temList = (data) => request({
  url:`${api}/template/getList`,
  method:'post',
  data
})
/*
* 获取模板内容
* method：post
* */
export const temOne = (data) => request({
  url:`${api}/template/getTemplateInfo`,
  method:'post',
  data
})
/*
* 模板存储
* method：post
* */
export const updateTem = (data) => request({
  url:`${api}/template/update`,
  method:'post',
  data
})
/*
* 模板另存为
* method：post
* */
export const addTem = (data) => request({
  url:`${api}/template/add`,
  method:'post',
  data
})
